import request from '@/utils/request'

// 获取组织架构的部门列表
export function getDepartMentList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 删除组织架构的部门
export function delDepartMent(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 新增组织架构的部门
export function addDepartMentApi(data) {
  return request({
    url: `/company/department`,
    method: 'post',
    data
  })
}
// 获取部门详情
export function getDepartMentApi(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 修改部门详情
export function editDepartMentApi(form) {
  return request({
    url: `/company/department/${form.id}`,
    method: 'put',
    data: form
  })
}
